import Taro from '@tarojs/taro'
import { FC, useState } from 'react'
import { View } from '@tarojs/components'


interface CardProps {
  title?: string
  children?: React.ReactNode
  className?: string
  style?: React.CSSProperties
}

const Card: FC<CardProps> = (props) => {
  const { title, children, style } = props
  const [count, setcount] = useState(0)
  return (
    // eslint-disable-next-line react/react-in-jsx-scope
    <View style={{ ...style }}>
      {title && <View className='card-title'>{title}</View>}
      {children}
      {count}
      <View onClick={() => setcount(11)}>12312</View>
    </View>
  )
}

export default Card